all: bin\hfslib.pyd

bin\hfslib.pyd: build\hfslib.obj Makefile
	link /nologo /incremental:no /safeseh:no /merge:.rdata=.text /out:bin\hfslib.pyd /dll /implib:build\hfslib.lib /libpath:"C:\Program Files\Python311\libs" build\hfslib.obj gdi32.lib user32.lib Ole32.lib Shell32.lib

build\hfslib.obj: src\hfslib.c Makefile
	cl /c /nologo /O1 /GS- /Gy- /GR- /Oi- /I"C:\Program Files\Python311\include" /Fobuild\hfslib.obj src\hfslib.c

.PHONY: all clean

clean:
	del /q build\* bin\*